package cn.myfirefly.core.model;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

public class BaseDto {
	private String createBy;
	
	private Date createDate;
	
	private String modifyBy;
	
	private Date modifyDate;
	
	private Integer pageCurrent = 1;
	
    private Integer pageSize = 20;
    
    //lookup排序所接受的字段
    /** 排序方向 **/
    private String orderDirection;
    /** 排序字段 **/
    private String orderField;
    
    private DataAuth dataAuth;
    
    /**
     * 当前登录用户，数据权限的目标对象，
     * 比如，如果数据权限类型是人员，那么这里应该是当前登录人员的关键信息，
     * 如果数据权限类型是部门，那么这里应该是当前登录人员的部门关键信息
     */
    private Object targetDataAuthObject;
    
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

//	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getModifyBy() {
		return this.modifyBy;
	}

	public void setModifyBy(String modifyBy) {
		this.modifyBy = modifyBy;
	}

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getModifyDate() {
		return this.modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

	public Integer getPageCurrent() {
		return pageCurrent;
	}

	public void setPageCurrent(Integer pageCurrent) {
		this.pageCurrent = pageCurrent;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public String getOrderDirection() {
		return orderDirection;
	}

	public void setOrderDirection(String orderDirection) {
		this.orderDirection = orderDirection;
	}

	public String getOrderField() {
		return orderField;
	}

	public void setOrderField(String orderField) {
		this.orderField = orderField;
	}

	public DataAuth getDataAuth() {
		return dataAuth;
	}

	public void setDataAuth(DataAuth dataAuth) {
		this.dataAuth = dataAuth;
	}

	public Object getTargetDataAuthObject() {
		return targetDataAuthObject;
	}

	public void setTargetDataAuthObject(Object targetDataAuthObject) {
		this.targetDataAuthObject = targetDataAuthObject;
	}
}
